<div id="info">{$message}</div>
<div>

{if $loggedIn}

<div id="add-game" style="margin: 10px;">

  <form action="admin.php" method="post">
    <input type="hidden" name="do" value="add-game" />
    <table>
      <th>Add Game</th>
      <tr>
        <td>Id: </td><td><input type="text" name="game-id" /></td>
      </tr>
      <tr>
        <td>Title: </td><td><input type="text" name="game-title" /></td>
	  </tr>    
      <tr>
        <td>Manufacturer: </td><td><input type="text" name="game-manufacturer" /></td>
      </tr>
      <tr>
        <td>Release date: </td><td><input type="text" name="game-release-date" /></td>
      </tr>
      <tr>
        <td>Image url: </td><td><input type="text" name="game-image-url" /></td>
      </tr>
      <tr>
        <td>Amazon url: </td><td><input type="text" name="game-amazon-url" /></td>
      </tr>
      <tr>
        <td>Locale: </td><td>{html_options name=game-locale options=$locales}</td>
      </tr>
      <tr>
        <td>Description: </td><td><textarea name="game-description" rows="10" cols="50" wrap="off"></textarea></td>
      </tr>
      <tr>
        <td colspan="2"><input type="submit" value="Add Game" /></td>
      </tr>
    </table>
  </form>
</div>
<br/>
<div id="send-notification" style="margin: 10px;">

  <form action="admin.php" method="post">
    <input type="hidden" name="do" value="send-email"/>
    Subject:<br/>
    <input type="text" name="subject" /><br/><br/>
    Message:<br/>
    <textarea name="message" rows="10" cols="50" wrap="off"></textarea>
    <br/>
    <input type="submit" value="Send Email" />
  </form>
</div>

<div id="user-management" style="margin: 10px; border: 1px solid blue;">
  <a href="admin.php?do=update-users">Update users</a>
</div>

<div>
{foreach from=$users item=user}
{$user}<br/>
{/foreach}
</div>

{else}
<div style="margin: 10px;">
  <form action="admin.php" method="post">
  	Password:<br/>
  	<input type="password" name="password" />
  	<input type="submit" value="Sing In"/>
  </form>
</div>
{/if}

</div>